package com.github.hiling.common.constant;

import com.github.hiling.common.exception.ExceptionMessage;

public enum ErrorMessage implements ExceptionMessage {

    TOKEN_EMPTY(401, "授权信息不存在。"),
    TOKEN_ERROR(401, "授权信息错误。"),
    UNKNOWN_ERROR(500, "未知异常。");

    private final int value;
    private final String message;

    ErrorMessage(int value, String message) {
        this.value = value;
        this.message = message;
    }

    @Override
    public int value() {
        return this.value;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

    @Override
    public String toString() {
        return Integer.toString(this.value);
    }
}

